import uuid

from langgraph.store.memory import InMemoryStore

inmemory_store = InMemoryStore()
user_id = "example_user"
namespace_for_user_data = (user_id, "user_info")

memory_key = uuid.uuid4().hex

memory_value = {"user_name":"ExampleUser",
                "user_id":user_id, "namespace_for_user_data":namespace_for_user_data}
#使用put将记忆存储在memory store
inmemory_store.put(namespace_for_user_data,memory_key, memory_value)
print(f'已保存{memory_key}')

